package com.lj.back.manage.scaffold.module.job.DTO;

import com.lj.back.manage.scaffold.common.annotation.valid.EnumCheck;
import com.lj.back.manage.scaffold.module.job.enums.ScheduleJobOwnerEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 定时任务修改对象
 * @author lv
 * @version 1.0.0
 */
@Data
@ApiModel("定时任务更新对象")
public class ScheduleJobUpdateOwner {
    /**
     * 任务id
     */
    @NotNull(message = "{schedule.job.id.notnull}")
    @ApiModelProperty(value = "定时任务ID",example = "123451",required = true)
    private Long id;

    /**
     * 任务拥有者 {@link ScheduleJobOwnerEnum}
     */
    @ApiModelProperty(value = "任务拥有者  1开发---代码管理定时任务   2管理---后台管理定时任务",example = "1")
    @EnumCheck(enumClass = ScheduleJobOwnerEnum.class, message = "{schedule.job.owner.invalid}")
    @NotNull(message = "{定时任务拥有者不能为空}")
    private String owner;
}
